package ups.Analysis;

import java.util.Date;

import ups.Common.Port;
import ups.Common.Ship;

public class LeavingShip {
	/*private String name;
	private Date   time;
	private String port;
	public LeavingShip( String shipName, Date timeLeaving, String portName ) {
		name = shipName;
		time = timeLeaving;
		port = portName;
	}
	
	*/
	
	private Ship ship;
	private Port port;
	

	public LeavingShip(Ship ship, Port port) {
		super();
		if( ship == null ) {
			System.out.println( "Ship is NULL");
		}
		if( port == null ) {
			System.out.println( "Port is NULL");
		}
		
		this.ship = ship;
		this.port = port;
		//System.out.println( ship.toString() );
		//System.out.println( port.toString() );
	}

	public Port getPort() {
		return port;
	}

	public void setPort(Port port) {
		this.port = port;
	}

	public Ship getShip() {
		return ship;
	}

	public void setShip(Ship ship) {
		this.ship = ship;
	}

	public String toString() {
		return ship.getName() + " leaving " + port.getName() + " at " + ship.getDate().toString();
	}
}
